<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>发布考试</title>
    <meta name="keywords" content="">
    <link href="../resources/bootstrap/css/bootstrap.css" rel="stylesheet">
    <link href="../resources/font-awesome/css/font-awesome.min.css" rel="stylesheet">
    <link href="../resources/css/style.css" rel="stylesheet">
    <link rel="stylesheet" href="../resources/layui/css/layui.css"/>
    <link href="../resources/css/jquery-ui-1.9.2.custom.min.css" rel="stylesheet" type="text/css"/>
    <link href="../resources/css/question-add.css" rel="stylesheet">
    <!-- jQuery -->
    <script type="text/javascript" src="../resources/js/jquery/jquery-3.1.1.min.js"></script>
    <script type="text/javascript" src="../resources/js/all.js"></script>
    <!-- Bootstrap JS -->
    <script type="text/javascript" src="../resources/bootstrap/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="../resources/js/jquery/jquery-ui-1.9.2.custom.min.js"></script>
    <script type="text/javascript" src="../resources/js/jquery.ui.datepicker-zh-TW.js"></script>
    <!--layui相关-->
    <script type="text/javascript" src="../resources/layui/layui.all.js"></script>
    <script type="text/javascript" src="../resources/js/add-exam.js"></script>
    <!--表单验证-->
    <script type="text/javascript" src="../resources/js/jquery.validation/1.14.0/jquery.validate.min.js"></script>
    <script type="text/javascript" src="../resources/js/jquery.validation/1.14.0/messages_zh.min.js"></script>
    <script type="text/javascript" src="../resources/vue/vue.js"></script>
</head>
<body>
<header>
    <div class="container">
        <div class="row">
            <div class="col-xs-5">
                <div class="logo">
                    <h1><span>在线考试系统</span></h1>
                </div>
            </div>
        </div>
    </div>
    <div class="navbar bs-docs-nav" role="banner">
        <div class="container">
            <nav class="collapse navbar-collapse bs-navbar-collapse" role="navigation">
                <ul class="nav navbar-nav">
                    <li>
                        <a href=""><i class=""></i>首页</a>
                    </li>
                    <li>
                        <a href=""><i class=""></i>试题管理</a>
                    </li>
                    <li>
                        <a href=""><i class=""></i>试卷管理</a>
                    </li>
                    <li class="active">
                        <a href="exam-list.html"><i class=""></i>考试管理</a>
                    </li>
                    <li>
                        <a href="user-list.html"><i class=""></i>用户管理</a>
                    </li>
                    <li>
                        <a href=""><i class=""></i>通用管理</a>
                    </li>
                    <li>
                        <a href=""><i class=""></i>系统设置</a>
                    </li>
                </ul>
            </nav>
        </div>
    </div>
</header>
<div class="container" style="min-height:500px;">
        <div class="col-xs-10" id="right-content">
            <div class="page-header">
                <h1><i class="fa fa-file-text-o"></i> 发布考试 </h1>
            </div>
            <div class="page-content">
                <form id="form-examp-add" action="/ExamAddExam" method="post">
                    <div class="form-line add-update-examname">
                        <span class="form-label"><span class="warning-label">*</span>考试名称：</span>
                        <input id="exam-name" type="text" class="df-input-narrow" name="examName">
                        <span class="form-message"></span>
                    </div>
                    <div class="form-line add-update-exam-type">
                        <span class="form-label"><span class="warning-label">*</span>考试类型：</span>
                        <select class="df-input-narrow" name="examType">
                            <option value="1">公开考试</option>
                            <option value="2">私有考试</option>
                        </select>
                        <span class="form-message"></span>
                    </div>
                    <div class="form-line add-update-exam-paper">
                        <span class="form-label"><span class="warning-label">*</span>选择试卷：</span>

                        <input type="text" value="" id="examPaperId" hidden name="ExamPaperId">
                        <input type="text" placeholder="请选择点击试卷" id="selectExamPaper" readonly>

                        <span class="form-message"></span>
                    </div>
                    <div class="form-line add-update-exam-paper">
                        <span class="form-label"><span class="warning-label">*</span>考试简介：</span><textarea
                            style="resize: none;width: 300px;height: 200px" placeholder="考试简介"
                            name="examIntro"></textarea>
                    </div>
                    <div class="layui-inline">
                        <div class="layui-input-inline">
                            <label class="layui-form-label"><span
                                    class="warning-label">*</span>请选择考试开始时间:&nbsp;&nbsp;</label><input
                                class="layui-input" id="test5" placeholder="点击选择考试开始时间" type="text" name="startTime">
                        </div>
                    </div>
                    <div class="layui-inline">

                        <div class="layui-input-inline">
                            <label class="layui-form-label"><span
                                    class="warning-label">*</span>请选择考试截止时间:&nbsp;&nbsp;</label><input
                                class="layui-input" id="test6" placeholder="点击选择考试结束时间" type="text" name="endTime">
                        </div>
                    </div>
                    <div class="form-line">
                        <input value="确认发布" type="submit" id="exam-add-btn" class="df-submit btn btn-info">
                    </div>
                </form>

            </div>
        </div>
    </div>
<footer>
    <div class="container" style="width: 500px; margin: 0 auto;">
        <div class="row">
            <div class="col-md-12">
                <div class="copy">
                    <p>
                        ExamManage © <a href="javascript:void(0);" target="_blank">ExamManage</a> - <a
                            href="javascript:void(0);" target="_blank">主页</a> | <a href="javascript:void(0);" target="_blank">关于我们</a>
                        | <a href="javascript:void(0);" target="_blank">FAQ</a> | <a
                            href="javascript:void(0);" target="_blank">联系我们</a>
                    </p>
                </div>
            </div>
        </div>
    </div>
</footer>
</body>
</html>
<script type="text/javascript">
    $(function () {

        //时间选择
        layui.use('laydate', function () {
            var laydate = layui.laydate;

            //日期时间选择器
            laydate.render({
                elem: '#test5'
                , type: 'datetime'
            });
        })

        layui.use('laydate', function () {
            var laydate = layui.laydate;

            //日期时间选择器
            laydate.render({
                elem: '#test6'
                , type: 'datetime'
            });
        })

    });

    //弹出遮罩层 郭瀚钰
    $("#selectExamPaper").click(function () {
        layer.open({
            type: 2,
            title: '选择试卷',
            fix: false,
            maxmin: true,
            shadeClose: true,
            area: ['1100px', '600px'],
            content: 'find-examPaper.html',
            end: function () {
            }
        })
    })


    function check() {
        return $("#addUserForm").validate({
            rules: {
                name: {
                    required: true
                },
                password: {
                    required: true
                }
            },
            message: {
                name: {
                    required: ""
                },
                password: {
                    required: ""
                }
            }
        })
    }


</script>